package she_ji_mo_shi.gong_chang.factory;

import she_ji_mo_shi.gong_chang.model.chart.Bar;
import she_ji_mo_shi.gong_chang.model.chart.Histogram;
import she_ji_mo_shi.gong_chang.model.chart.Pie;
import she_ji_mo_shi.gong_chang.model.api.Chart;

public class SimplyChartFactory {
    private static final String HISTOGRAM = "Histogram";
    private static final String Pie = "Pie";
    private static final String Bar = "Bar";
    public static Chart getChart(String chartType) {
        Chart chart = null;
        switch (chartType) {
            case HISTOGRAM:
                chart = new Histogram();
                System.out.println("do init histogram");
                break;
            case Pie:
                chart = new Pie();
                System.out.println("do init pie");
                break;
            case Bar:
                chart = new Bar();
                System.out.println("do init bar");
        }
        return chart;
    }
}
